/*
 * @Author: hh
 * @Date: 2025-09-16 13:39:40
 * @LastEditors: hh
 * @LastEditTime: 2025-09-16 13:49:48
 * @Description:
 */
import React from "react";
import type { PropsWithChildren } from "react";

import type { SizeType } from "./index";

export interface ConfigContextType {
  space?: {
    size?: SizeType;
  };
}
export const ConfigContext = React.createContext<ConfigContextType>({});
interface ConfigProviderProps extends PropsWithChildren<ConfigContextType> {}

export function ConfigProvider(props: ConfigProviderProps) {
  const { space, children } = props;

  return (
    <ConfigContext.Provider value={{ space }}>
      {children}
    </ConfigContext.Provider>
  );
}
